package com.semidata.trp.business.model;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class StrategyModel {

	private int id;
	private boolean deleted;
	private int orgId;
	private Date start;
	private Date end;
	private int priority;
	private int frequency;
	private Integer algorithm;
	private String params;
	private String landingPage;
	// private int totalAmount;
	private int totalAmountIn;
	private int totalAmountOut;
	private int totalAmountAlly;
	// private int dailyAmount;
	// private double totalBudget;
	// private double dailyBudget;
	private int dailyAmountIn;
	private double totalBudgetIn;
	private double dailyBudgetIn;
	private int dailyAmountOut;
	private double totalBudgetOut;
	private double dailyBudgetOut;
	private int dailyAmountAlly;
	private double totalBudgetAlly;
	private double dailyBudgetAlly;
	// private int consumeType;
	private int consumeTypeIn;
	private int consumeTypeOut;
	private int consumeTypeAlly;
	private Timestamp lastUpdate;
	private Map<Integer, ResourcePriceModel> resourcePrices = new HashMap<>();
	private Map<Integer, MaterialWeightModel> materialWeights = new HashMap<>();
	private Set<String> areas = new HashSet<>();
	private Set<Integer> hours = new HashSet<>();

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public int getOrgId() {
		return orgId;
	}

	public void setOrgId(int orgId) {
		this.orgId = orgId;
	}

	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	public Date getEnd() {
		return end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public int getFrequency() {
		return frequency;
	}

	public void setFrequency(int frequency) {
		this.frequency = frequency;
	}

	public String getLandingPage() {
		return landingPage;
	}

	public void setLandingPage(String landingPage) {
		this.landingPage = landingPage;
	}

	public int getTotalAmountIn() {
		return totalAmountIn;
	}

	public void setTotalAmountIn(int totalAmountIn) {
		this.totalAmountIn = totalAmountIn;
	}

	public int getTotalAmountOut() {
		return totalAmountOut;
	}

	public void setTotalAmountOut(int totalAmountOut) {
		this.totalAmountOut = totalAmountOut;
	}

	public Timestamp getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Timestamp lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public void addResourcePrice(ResourcePriceModel model) {
		this.resourcePrices.put(model.getResourceId(), model);
	}

	public Map<Integer, ResourcePriceModel> getResourcePrices() {
		return resourcePrices;
	}

	public void addMaterialWeight(MaterialWeightModel model) {
		this.materialWeights.put(model.getMaterialId(), model);

	}

	public Map<Integer, MaterialWeightModel> getMaterialWeights() {
		return materialWeights;
	}

	public void addArea(String area) {
		this.areas.add(area);
	}

	public Set<String> getAreas() {
		return areas;
	}

	public void addHour(StrategyHourModel model) {
		this.hours.add(model.getHour());

	}

	public Set<Integer> getHours() {
		return hours;
	}

	@Override
	public String toString() {
		return "StrategyModel [id=" + id + ", deleted=" + deleted + ", orgId="
				+ orgId + ", start=" + start + ", end=" + end + ", priority="
				+ priority + ", frequency=" + frequency + ", landingPage="
				+ landingPage + ", totalAmountIn=" + totalAmountIn
				+ ", totalAmountOut=" + totalAmountOut + ", totalAmountAlly="
				+ totalAmountAlly + ", dailyAmountIn=" + dailyAmountIn
				+ ", dailyAmountOut=" + dailyAmountOut + ", dailyAmountAlly="
				+ dailyAmountAlly + ", totalBudgetIn=" + totalBudgetIn
				+ ", totalBudgetOut=" + totalBudgetOut + ", totalBudgetAlly="
				+ totalBudgetAlly + ", dailyBudgetIn=" + dailyBudgetIn
				+ ", dailyBudgetOut=" + dailyBudgetOut + ", dailyBudget=Ally"
				+ dailyBudgetAlly + ", consumeTypeIn=" + consumeTypeIn
				+ ", consumeTypeOut=" + consumeTypeOut + ", consumeTypeAlly="
				+ consumeTypeAlly + ", lastUpdate=" + lastUpdate
				+ ", algorithm=" + algorithm + ", params=" + params
				+ ", resourcePrices=" + resourcePrices + ", materialWeights="
				+ materialWeights + ", areas=" + areas + ", hours=" + hours
				+ "]";
	}

	public int getTotalAmountAlly() {
		return totalAmountAlly;
	}

	public void setTotalAmountAlly(int totalAmountAlly) {
		this.totalAmountAlly = totalAmountAlly;
	}

	public int getDailyAmountIn() {
		return dailyAmountIn;
	}

	public void setDailyAmountIn(int dailyAmountIn) {
		this.dailyAmountIn = dailyAmountIn;
	}

	public double getTotalBudgetIn() {
		return totalBudgetIn;
	}

	public void setTotalBudgetIn(double totalBudgetIn) {
		this.totalBudgetIn = totalBudgetIn;
	}

	public double getDailyBudgetIn() {
		return dailyBudgetIn;
	}

	public void setDailyBudgetIn(double dailyBudgetIn) {
		this.dailyBudgetIn = dailyBudgetIn;
	}

	public int getDailyAmountOut() {
		return dailyAmountOut;
	}

	public void setDailyAmountOut(int dailyAmountOut) {
		this.dailyAmountOut = dailyAmountOut;
	}

	public double getTotalBudgetOut() {
		return totalBudgetOut;
	}

	public void setTotalBudgetOut(double totalBudgetOut) {
		this.totalBudgetOut = totalBudgetOut;
	}

	public double getDailyBudgetOut() {
		return dailyBudgetOut;
	}

	public void setDailyBudgetOut(double dailyBudgetOut) {
		this.dailyBudgetOut = dailyBudgetOut;
	}

	public int getDailyAmountAlly() {
		return dailyAmountAlly;
	}

	public void setDailyAmountAlly(int dailyAmountAlly) {
		this.dailyAmountAlly = dailyAmountAlly;
	}

	public double getTotalBudgetAlly() {
		return totalBudgetAlly;
	}

	public void setTotalBudgetAlly(double totalBudgetAlly) {
		this.totalBudgetAlly = totalBudgetAlly;
	}

	public double getDailyBudgetAlly() {
		return dailyBudgetAlly;
	}

	public void setDailyBudgetAlly(double dailyBudgetAlly) {
		this.dailyBudgetAlly = dailyBudgetAlly;
	}

	public int getConsumeTypeIn() {
		return consumeTypeIn;
	}

	public void setConsumeTypeIn(int comsumeTypeIn) {
		this.consumeTypeIn = comsumeTypeIn;
	}

	public int getConsumeTypeOut() {
		return consumeTypeOut;
	}

	public void setConsumeTypeOut(int comsumeTypeOut) {
		this.consumeTypeOut = comsumeTypeOut;
	}

	public int getConsumeTypeAlly() {
		return consumeTypeAlly;
	}

	public void setConsumeTypeAlly(int comsumeTypeAlly) {
		this.consumeTypeAlly = comsumeTypeAlly;
	}

	public Integer getAlgorithm() {
		return algorithm;
	}

	public void setAlgorithm(Integer algorithm) {
		this.algorithm = algorithm;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}
}
